package com.hz.pay.center.service.impl;

import com.hz.pay.center.mapper.NoticeResultInfoMapper;
import com.hz.pay.center.model.NoticeResultInfo;
import com.hz.pay.center.service.INoticeResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 支付服务异步通知业务结果相关接口
 */
@Service
public class NoticeResultServiceImpl implements INoticeResultService {

    @Autowired
    private NoticeResultInfoMapper noticeResultInfoMapper;


    @Override
    public NoticeResultInfo queryByPaySerialNo(String paySerialNo) {

        return noticeResultInfoMapper.queryByPaySerialNo(paySerialNo);
    }

    @Override
    public void createNoticeResult(NoticeResultInfo noticeResultInfo) {

        noticeResultInfoMapper.insertSelective(noticeResultInfo);
    }

    @Override
    public void updateNoticeResult(NoticeResultInfo noticeResultInfo) {

        noticeResultInfoMapper.updateByPrimaryKeySelective(noticeResultInfo);

    }
}
